package cn.iocoder.yudao.module.picturebook.dal.mysql.bookcontext;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.picturebook.dal.dataobject.bookcontext.BookContextDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.picturebook.controller.admin.bookcontext.vo.*;

/**
 * 绘本内容表	 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface BookContextMapper extends BaseMapperX<BookContextDO> {

    default PageResult<BookContextDO> selectPage(BookContextPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<BookContextDO>()
                .eqIfPresent(BookContextDO::getContext, reqVO.getContext())
                .betweenIfPresent(BookContextDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(BookContextDO::getBookId));
    }

}